package es.deusto.ingenieria.is.touringproject;

import es.deusto.ingenieria.is.search.algorithms.blind.BreadthFS;
import es.deusto.ingenieria.is.search.algorithms.blind.BreadthFSwithLog;
import es.deusto.ingenieria.is.search.algorithms.blind.DepthFS;
import es.deusto.ingenieria.is.search.algorithms.blind.DepthFSwithLog;
import es.deusto.ingenieria.is.search.algorithms.heuristic.BestFS;
import es.deusto.ingenieria.is.search.algorithms.heuristic.BestFSwithLog;
import es.deusto.ingenieria.is.touringproject.formulation.*;
import es.deusto.ingenieria.is.touringproject.heuristics.DistanceEvaluationFunction;
import es.deusto.ingenieria.is.touringproject.heuristics.EuclideanDistanceEvaluationFunction;
import es.deusto.ingenieria.is.touringproject.heuristics.ManhattanDistanceEvaluationFunction;

public class MainProgram {

	public static void main(String[] args) {
		try {
			TouringProblem problem = new TouringProblem();	
			Environment temp = (Environment) problem.getInitialStates().get(0);
			problem.addInitialState(temp);			
//			problem.solve(DepthFS.getInstance());	
//			problem.solve(new BestFS(new DistanceEvaluationFunction()));
//			problem.solve(BreadthFS.getInstance());
//			problem.solve(new UniformCost(new EuclideanDistanceEvaluationFunction()));
			problem.solve(new UniformCost(new ManhattanDistanceEvaluationFunction()));
			
		} catch (Exception ex) {
			System.err.println("% [Main Program] Error: " + ex.getMessage());
			ex.printStackTrace();
		}
	}
}